/*     */ package xin.petstore.framework.cas;
/*     */ 
/*     */ import java.io.Serializable;
/*     */ import org.jasig.cas.client.authentication.AttributePrincipal;
/*     */ import org.jasig.cas.client.util.CommonUtils;
/*     */ import org.jasig.cas.client.validation.Assertion;
/*     */ import org.slf4j.Logger;
/*     */ import org.slf4j.LoggerFactory;
/*     */ 
/*     */ public class UserInfo
/*     */   implements Serializable
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*  18 */   private static Logger log = LoggerFactory.getLogger(UserInfo.class);
/*     */   private String userName;
/*     */   private String userRealName;
/*     */   private String userId;
/*     */   private String email;
/*     */   private String mobile;
/*     */   private String nickname;
/*     */   private String idCard;
/*     */   private String roles;
/*     */   private String permissions;
/*     */   private Assertion assertion;
/*     */   private String paypassword;
/*     */   private String status;
/*     */   private String photo;
/*     */   private String accountNum;
/*     */   private String userType;
/*     */ 
/*     */   public String getUserName()
/*     */   {
/*  53 */     return this.userName;
/*     */   }
/*     */ 
/*     */   public void setUserName(String userName) {
/*  57 */     this.userName = userName;
/*     */   }
/*     */ 
/*     */   public String getUserId() {
/*  61 */     return this.userId;
/*     */   }
/*     */ 
/*     */   public void setUserId(String userId) {
/*  65 */     this.userId = userId;
/*     */   }
/*     */ 
/*     */   public Assertion getAssertion() {
/*  69 */     return this.assertion;
/*     */   }
/*     */ 
/*     */   public void setAssertion(Assertion assertion) {
/*  73 */     this.assertion = assertion;
/*     */   }
/*     */ 
/*     */   public String getRoles() {
/*  77 */     return this.roles;
/*     */   }
/*     */ 
/*     */   public void setRoles(String roles) {
/*  81 */     this.roles = roles;
/*     */   }
/*     */ 
/*     */   public String getPermissions() {
/*  85 */     return this.permissions;
/*     */   }
/*     */ 
/*     */   public void setPermissions(String permissions) {
/*  89 */     this.permissions = permissions;
/*     */   }
/*     */ 
/*     */   public String getUserRealName() {
/*  93 */     return this.userRealName;
/*     */   }
/*     */ 
/*     */   public void setUserRealName(String userRealName) {
/*  97 */     this.userRealName = userRealName;
/*     */   }
/*     */ 
/*     */   public String getEmail() {
/* 101 */     return this.email;
/*     */   }
/*     */ 
/*     */   public void setEmail(String email) {
/* 105 */     this.email = email;
/*     */   }
/*     */ 
/*     */   public String getMobile() {
/* 109 */     return this.mobile;
/*     */   }
/*     */ 
/*     */   public void setMobile(String mobile) {
/* 113 */     this.mobile = mobile;
/*     */   }
/*     */ 
/*     */   public String getNickname() {
/* 117 */     return this.nickname;
/*     */   }
/*     */ 
/*     */   public void setNickname(String nickname) {
/* 121 */     this.nickname = nickname;
/*     */   }
/*     */ 
/*     */   public String getIdCard() {
/* 125 */     return this.idCard;
/*     */   }
/*     */ 
/*     */   public void setIdCard(String idCard) {
/* 129 */     this.idCard = idCard;
/*     */   }
/*     */ 
/*     */   public String getPaypassword() {
/* 133 */     return this.paypassword;
/*     */   }
/*     */ 
/*     */   public void setPaypassword(String paypassword) {
/* 137 */     this.paypassword = paypassword;
/*     */   }
/*     */ 
/*     */   public String getStatus() {
/* 141 */     return this.status;
/*     */   }
/*     */ 
/*     */   public void setStatus(String status) {
/* 145 */     this.status = status;
/*     */   }
/*     */ 
/*     */   public String getPhoto() {
/* 149 */     return this.photo;
/*     */   }
/*     */ 
/*     */   public void setPhoto(String photo) {
/* 153 */     this.photo = photo;
/*     */   }
/*     */ 
/*     */   public String getAccountNum() {
/* 157 */     return this.accountNum;
/*     */   }
/*     */ 
/*     */   public void setAccountNum(String accountNum) {
/* 161 */     this.accountNum = accountNum;
/*     */   }
/*     */ 
/*     */   public String getUserType() {
/* 165 */     return this.userType;
/*     */   }
/*     */ 
/*     */   public void setUserType(String userType) {
/* 169 */     this.userType = userType;
/*     */   }
/*     */ 
/*     */   public String getService(String serviceUrl) {
/* 173 */     if (this.assertion != null) {
/* 174 */       String proxyTicket = this.assertion.getPrincipal().getProxyTicketFor(serviceUrl);
/* 175 */       if (serviceUrl.indexOf("?") > 0) {
/* 176 */         serviceUrl = "&ticket=" + proxyTicket;
/*     */       }
/* 178 */       if (log.isInfoEnabled()) {
/* 179 */         log.info("UserInfo getService url:" + serviceUrl);
/*     */       }
/* 181 */       return CommonUtils.getResponseFromServer(serviceUrl, null);
/*     */     }
/* 183 */     return null;
/*     */   }
/*     */   public String getService(String serviceUrl, String encoding) {
/* 186 */     if (this.assertion != null) {
/* 187 */       String proxyTicket = this.assertion.getPrincipal().getProxyTicketFor(serviceUrl);
/* 188 */       if (serviceUrl.indexOf("?") > 0) {
/* 189 */         serviceUrl = "&ticket=" + proxyTicket;
/*     */       }
/* 191 */       if (log.isInfoEnabled()) {
/* 192 */         log.info("UserInfo getService url:" + serviceUrl);
/*     */       }
/* 194 */       return CommonUtils.getResponseFromServer(serviceUrl, null);
/*     */     }
/* 196 */     return null;
/*     */   }
/*     */ 
/*     */   public String toString()
/*     */   {
/* 201 */     return "UserInfo [userName=" + this.userName + ", userRealName=" + 
/* 202 */       this.userRealName + ", userId=" + this.userId + ", email=" + this.email + 
/* 203 */       ", mobile=" + this.mobile + ", nickname=" + this.nickname + ", idCard=" + 
/* 204 */       this.idCard + ", roles=" + this.roles + ", permissions=" + this.permissions + 
/* 205 */       ", assertion=" + this.assertion + "]";
/*     */   }
/*     */ }

/* Location:           C:\java代码反编译器\core-1.1.4.jar
 * Qualified Name:     com.eloancn.framework.cas.UserInfo
 * JD-Core Version:    0.6.0
 */